#ifndef _MUSICSERVER_H_
#define _MUSICSERVER_H_

#include <iostream>
#include <string>
#include "stdTcpService.h"
#include "stdDataBase.h"
#include <string>
#include <map>
#include "stdSqliteDataBase.h"

class MusicServer
{
private:
    
public:
    MusicServer(const  StdTcpSocket &clientSocket);
    ~MusicServer();
public:
    //处理注册
    void handleRegisterInfo(const std::string &info);
    //处理登录
    void handleLogininInfo(const std::string &info);
    //void setAttr(StdTcpSocket * clientSocket);
    void handleDownLoadMusic(const std::string &data);

    void handleSearchMusic(const std::string &data);
private:
    //判断用户名是否存在
    bool userExit(const std::string &username);
    std::string readMusicInfo(const std::string &filepath);
    stdSqliteDataBase *sqlite;
private:
    StdTcpSocket m_clientSocket;
    std::map<std::string,std::string> song;
   
    
};









#endif